/*
 * @Author       : ljkt
 * @Version      : 1.0
 * @Date         : 2021-10-05 18:00:43
 * @LastEditors: ljkt
 * @LastEditTime: 2024-06-03 14:40:06
 * @Description  :
 */

#ifndef _Dev_Ntc_H_
#define _Dev_Ntc_H_
typedef struct
{
    u16_t Tick;
    s16_t Temp10_Buf[10];
    u8_t Head_Index;
    s16_t Val10;
} s_ntc_k_t;
typedef struct
{
    s16_t Val;
    s16_t Val10;
} s_ntc_temp_t;

typedef struct
{
    u8_t NTC_Open : 1;
    u8_t NTC_Short : 1;
    u8_t Temp_Hig : 1;
    u8_t Mos : 1;
    u16_t Open_Cnt;
    u16_t Short_Cnt;
    u16_t Mos_Cnt;
    u16_t TempHig_Cnt;
    s16_t ADC_Cha;
} s_ntc_warn_t;

typedef struct
{

    // u16_t Temp;
    // u16_t Temp10;
    // u16_t Res;
    s_ntc_k_t XieLv_K;
    s_ntc_temp_t Temp;
    s_ntc_warn_t Warn;
} s_type_ntc_t;

typedef struct
{
    s_type_ntc_t Up;
    s_type_ntc_t Down;
} s_dev_ntc_t;
extern s_dev_ntc_t gDev_Ntc;
void Dev_Ntc_Init(void);
void Dev_Ntc_Scan(void);
#endif
